<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <!-- <button id="btn">按我改变</button> -->
  <div id="container"></div>
  <script src="http://localhost:8080/xuni/bundle.js"></script>
  <script>
    var word = `
    <div>
      <ol>
        {{#student}}
          <li>
            学生{{name}}的爱好是
            <ol>
              {{#hobbies}}
              <li>{{.}}</li>
            {{/hobbies}}
            </ol>
          </li>
        {{/student}}
      </ol>
    </div>
    `
    let data = {
      student: [
        { name: '测试1', mood: "开心",hobbies:['抽咽'] },
        { name: '测试2', mood: "开心",hobbies:['抽咽','喝酒'] },
        { name: '测试3', mood: "开心",hobbies:['抽咽','喝酒'] },
      ]
    }
    let final = mustacge.render(word, data)
    console.log(final)
    var container = document.getElementById("container");
    container.innerHTML = final;
  </script>
</body>

</html>